package com.作业.第八章作业.HomeWork05;

public class Scientist extends Employ{
    private double bonus;

    public Scientist(String name, double salary, double bonus) {
        super(name, salary);
        this.bonus = bonus;
    }

    public void printsalary(){
        System.out.println("科学家 " + getName() + " 年薪为 "+( getSalary()*12 + bonus) +"RMB" );
    }
}
